// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
DEFINE OBJECTS 1
DEFINE OBJECT SANNY BUILDER 3.04      

DEFINE MISSIONS 1
DEFINE MISSION 0 AT @MISSN_15         

DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script

DEFINE UNKNOWN_EMPTY_SEGMENT 0

DEFINE UNKNOWN_THREADS_MEMORY 500

{$VERSION 3.1.0027}

//-------------MAIN---------------
thread 'MAIN' 
fade 0 0 
01F0: set_max_wanted_level_to 6 
set_wb_check_to 0 
00C0: set_current_time_hours_to 8 minutes_to 0 
023C: load_special_actor 'TENPEN' as 1 // models 290-299 
Camera.SetAtPos(1930.425, -2442.212, 14.0557)
$PLAYER_CHAR = Player.Create(#NULL, 1408.132, -2261.637, 13.5469)
Player.Build($PLAYER_CHAR)
09C7: change_player $PLAYER_CHAR model_to #SPECIAL01 
$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 
set_weather 1 
wait 0 
Player.CanMove($PLAYER_CHAR) = False
select_interior 0 
0629: change_integer_stat 181 to 4 
016C: restart_if_wasted_at 1408.132 -2261.637 13.5469 angle 90.0 town_number 0 
016D: restart_if_busted_at 1408.132 -2261.637 13.5469 angle 90.0 town_number 0 
0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 
$ONMISSION = 0 
$DEFAULT_WAIT_TIME = 250 
03E6: remove_text_box 
$CRASH_MARKER = Marker.CreateIconAndSphere(16, 1443.766, -2287.178, 13.5469)
fade 1 500 
wait 1000 
Player.CanMove($PLAYER_CHAR) = True

:MAIN_249
wait $DEFAULT_WAIT_TIME 
00BF: $Time_Hours = current_time_hours, $Time_Mins = current_time_minutes 
if and
  $ONMISSION == 0 
00ED:   actor $PLAYER_ACTOR 0 near_point 1443.766 -2287.178 radius 2.0 2.0 on_foot 
jf @MAIN_316 
Marker.Disable($CRASH_MARKER)
start_mission 0 

:MAIN_316
jump @MAIN_249 

//-------------Mission 0---------------

:MISSN_15
thread 'MISSN_15' 
$ONMISSION = 1 
gosub @MISSN_15_77 
if 
wasted_or_busted 
jf @MISSN_15_68 
$CRASH_MARKER = Marker.CreateIconAndSphere(16, 1443.766, -2287.178, 13.5469)

:MISSN_15_68
gosub @MISSN_15_2219 
end_thread 

:MISSN_15_77
fade 0 0 

:MISSN_15_83
wait 0 
if 
   not fading 
jf @MISSN_15_83 
Model.Load(#AT400)
Model.Load(#WFYCLOT)

:MISSN_15_110
wait 0 
if and
   Model.Available(#AT400)
   Model.Available(#WFYCLOT)
jf @MISSN_15_110 
120@ = Car.Create(#AT400, 1901.7, -2391.0, 13.5547)
Car.Angle(120@) = 94.856
0129: 121@ = create_actor_pedtype 24 model #WFYCLOT in_car 120@ driverseat 
0376: 122@ = create_random_actor_at 1882.036 -2402.53 13.5547 
0376: 122@ = create_random_actor_at 1882.236 -2404.53 13.5547 
0376: 122@ = create_random_actor_at 1882.136 -2405.53 13.5547 
0376: 122@ = create_random_actor_at 1882.336 -2407.53 13.5547 
0376: 122@ = create_random_actor_at 1882.136 -2409.53 13.5547 
Actor.PutAt($PLAYER_ACTOR, 1882.036, -2400.53, 13.5547)
Actor.Angle($PLAYER_ACTOR) = 0.5
067C: put_camera_on_actor $PLAYER_ACTOR with_offset -4.0 -13.0 5.0 rotation 0.0 0.0 0.0 0.0 2 
Player.CanMove($PLAYER_CHAR) = False
054C: use_GXT_table 'JABM15' 
wait 2500 
02A3: enable_widescreen 1 
fade 1 2500 

:MISSN_15_387
wait 0 
if 
   not fading 
jf @MISSN_15_387 
00BC: show_text_highpriority GXT 'JA01' time 3000 flag 1  // Nothing like a relaxing vaction in Las Venturas.
wait 3500 
00BC: show_text_highpriority GXT 'JA02' time 4000 flag 1  // Gambling, hookers, drugs, and beer now that has got to be the best way to spend down time.
wait 4500 
0430: put_actor $PLAYER_ACTOR into_car 120@ passenger_seat 0 

:MISSN_15_456
wait 0 
if 
   Actor.InCar($PLAYER_ACTOR, 120@)
jf @MISSN_15_456 
Car.PutAt(120@, 1400.893, -2494.008, 190.5391)
04D2: set_plane 120@ fly_autopilot_around_point 328.9085 2017.646 400.0 altitude_between 0.0 and 250.0 
Camera.Restore_WithJumpCut
Camera.SetBehindPlayer
00BC: show_text_highpriority GXT 'JA03' time 5000 flag 1  // Attention passengers, there has been a slight mishap in the cargo hold.
03CF: load_wav 44618 as 1 
gosub @MISSN_15_2171 
00BC: show_text_highpriority GXT 'JA04' time 5000 flag 1  // A box of snakes is loose on this aircarft, should you see any snakes please do not touch them.
03CF: load_wav 44619 as 1 
gosub @MISSN_15_2171 
00BC: show_text_highpriority GXT 'JA05' time 5000 flag 1  // Thank you, and enjoy your flight.
03CF: load_wav 44620 as 1 
gosub @MISSN_15_2171 
00BC: show_text_highpriority GXT 'JA06' time 5000 flag 1  // Excuse me officer but, do you have any skill as a pilot? Can you fly a plane?
03CF: load_wav 44621 as 1 
gosub @MISSN_15_2171 
00BC: show_text_highpriority GXT 'JA07' time 5000 flag 1  // Officer look out a snake!
03CF: load_wav 44622 as 1 
gosub @MISSN_15_2171 
00BC: show_text_highpriority GXT 'JA08' time 7000 flag 1  // What a pretty snake... like a rainbow... pretty snake... Sure I can fly, without a plane.
03CF: load_wav 44623 as 1 
gosub @MISSN_15_2171 

:MISSN_15_725
wait 0 
0819: 7@ = actor $PLAYER_ACTOR distance_from_ground 
if 
  7@ > 300.0 
jf @MISSN_15_725 
fade 0 0 

:MISSN_15_764
wait 0 
if 
   not fading 
jf @MISSN_15_764 
068B: set_car 120@ all_disembark 

:MISSN_15_786
wait 0 
if 
   not Actor.InCar($PLAYER_ACTOR, 120@)
jf @MISSN_15_786 
Car.Destroy(120@)
04ED: load_animation "PARACHUTE" 

:MISSN_15_827
wait 0 
if 
04EE:   animation "PARACHUTE" loaded 
jf @MISSN_15_827 
08B2: enable_thermal_vision 1 
03CF: load_wav 44600 as 1 
03CF: load_wav 44601 as 2 

:MISSN_15_877
wait 0 
if and
03D0:   wav 1 loaded 
03D0:   wav 2 loaded 
jf @MISSN_15_877 
98@ = 44602 
99@ = 1 
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 0.0 
067C: put_camera_on_actor $PLAYER_ACTOR with_offset 0.0 -3.0 1.0 rotation 0.0 0.0 0.0 0.0 2 
03D1: play_wav 1 
018A: 43@ = create_checkpoint_at 1477.466 1464.806 10.8203 
Player.CanMove($PLAYER_CHAR) = True
02A3: enable_widescreen 0 
fade 1 0 

:MISSN_15_1020
wait 0 
if 
   not fading 
jf @MISSN_15_1020 
03E5: show_text_box 'JA09'  // You can fly up by pulling back on the joystick or ~k~~GO_BACK~ key. Descend by pushing forward or using the ~k~~GO_FORWARD~ key. Move left and right using the stick or the ~k~~GO_LEFT~ / ~k~~GO_RIGHT~ keys.  Forward movement is constant.

:MISSN_15_1048
wait 0 
083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ $1507 $1508 $1509 
0819: 7@ = actor $PLAYER_ACTOR distance_from_ground 
if and
  99@ == 1 
03D2:   wav 1 ended 
jf @MISSN_15_1144 
03D1: play_wav 2 
040D: unload_wav 1 
03CF: load_wav 98@ as 1 

:MISSN_15_1111
wait 0 
if 
03D0:   wav 1 loaded 
jf @MISSN_15_1111 
98@ += 1 
99@ = 0 

:MISSN_15_1144
if and
  99@ == 0 
03D2:   wav 2 ended 
jf @MISSN_15_1250 
03D1: play_wav 1 
040D: unload_wav 2 
03CF: load_wav 98@ as 2 

:MISSN_15_1181
wait 0 
if 
03D0:   wav 2 loaded 
jf @MISSN_15_1181 
98@ += 1 
99@ = 1 
if 
  98@ > 44616 
jf @MISSN_15_1250 
99@ = 2 
040D: unload_wav 1 
040D: unload_wav 2 

:MISSN_15_1250
1@ = Actor.Angle($PLAYER_ACTOR)
0494: get_joystick 0 data_to 10@ 11@ 12@ 12@ 
if 
  10@ == 0 
jf @MISSN_15_1344 
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_ACCEL" IFP_file "PARACHUTE" 1.0 loopA 1 lockX 0 lockY 0 lockF 0 time 250 // versionB 

:MISSN_15_1344
if 
  10@ > 0 
jf @MISSN_15_1420 
1@ -= 1.0 
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_R" IFP_file "PARACHUTE" 1.0 loopA 1 lockX 0 lockY 0 lockF 0 time 250 // versionB 

:MISSN_15_1420
if 
  0 > 10@ 
jf @MISSN_15_1496 
1@ += 1.0 
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_L" IFP_file "PARACHUTE" 1.0 loopA 1 lockX 0 lockY 0 lockF 0 time 250 // versionB 

:MISSN_15_1496
if 
   not 1@ >= 0.0 
jf @MISSN_15_1527 
1@ += 360.0 

:MISSN_15_1527
if 
  1@ > 360.0 
jf @MISSN_15_1558 
1@ -= 360.0 

:MISSN_15_1558
Actor.Angle($PLAYER_ACTOR) = 1@
Actor.StorePos($PLAYER_ACTOR, $TEMPVAR_FLOAT_a, $TEMPVAR_FLOAT_b, $TEMPVAR_FLOAT_c)
02F6: $tempvar_Float_1 = cosine 1@ // (float) 
02F7: $tempvar_Float_2 = sine 1@ // (float) 
$tempvar_Float_1 *= -1.0 
if 
   not 11@ >= 0 
jf @MISSN_15_1634 
$1509 -= 5.0 

:MISSN_15_1634
if 
  11@ > 0 
jf @MISSN_15_1662 
$1509 += 5.0 

:MISSN_15_1662
0059: $1507 += $tempvar_Float_1 // (float) 
0059: $1508 += $tempvar_Float_2 // (float) 
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ $1507 $1508 $1509 
if or
   Actor.Dead($PLAYER_ACTOR)
   not 7@ >= 10.0 
jf @MISSN_15_1048 
fade 0 0 

:MISSN_15_1724
wait 0 
if 
   not fading 
jf @MISSN_15_1724 
Actor.PutAt($PLAYER_ACTOR, 1477.466, 1464.806, 10.8203)
120@ = Car.Create(#AT400, 1477.466, 1564.806, 10.8203)
08B2: enable_thermal_vision 0 
wait 500 
072A: put_actor $PLAYER_ACTOR into_car 120@ driverseat 

:MISSN_15_1801
wait 0 
if 
   Actor.DrivingPlane($PLAYER_ACTOR)
jf @MISSN_15_1801 
Car.PutAt(120@, $TEMPVAR_FLOAT_a, $TEMPVAR_FLOAT_b, $TEMPVAR_FLOAT_c)
Car.Angle(120@) = 1@
07D5: set_car 120@ velocity_in_direction_XYZ $1507 $1508 $1509 rotation_velocitiesXY 0.0 0.0 unk 0.0 
fade 1 0 

:MISSN_15_1878
wait 0 
if 
   not fading 
jf @MISSN_15_1878 
Camera.Restore_WithJumpCut
040D: unload_wav 1 
040D: unload_wav 2 
99@ = 0 
if 
80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 1477.466 1464.806 10.8203 radius 330.0 330.0 330.0 
jf @MISSN_15_2043 

:MISSN_15_1960
0209: 99@ = random_int_in_ranges 44624 44628 
03CF: load_wav 99@ as 1 
gosub @MISSN_15_2171 
Car.Health(120@) = 0
Actor.Health($PLAYER_ACTOR) = 1
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
$CRASH_MARKER = Marker.CreateIconAndSphere(16, -1635.9, 721.0715, 14.6169)
return 

:MISSN_15_2043
wait 0 
if 
   not Actor.Dead($PLAYER_ACTOR)
jf @MISSN_15_1960 
if 
  99@ == 0 
jf @MISSN_15_2117 
Camera.SetBehindPlayer
03CF: load_wav 44628 as 1 
gosub @MISSN_15_2171 
03E5: show_text_box 'JA10'  // Land and exit the plane.
99@ = 1 

:MISSN_15_2117
if 
   not Actor.DrivingPlane($PLAYER_ACTOR)
jf @MISSN_15_2043 
030C: progress_made += 1 
0394: play_music 1 
Player.ClearWantedLevel($PLAYER_CHAR)
01E3: show_text_1number_styled GXT 'M_PASSR' number 7 time 5000 style 1  // MISSION PASSED!~n~~w~RESPECT +
wait 5000 
return 

:MISSN_15_2171
wait 0 
if 
03D0:   wav 1 loaded 
jf @MISSN_15_2171 
03D1: play_wav 1 

:MISSN_15_2194
wait 0 
if 
03D2:   wav 1 ended 
jf @MISSN_15_2194 
040D: unload_wav 1 
return 

:MISSN_15_2219
$ONMISSION = 0 
01BD: $Current_Time_in_ms = current_time_in_ms 
Marker.Disable(43@)
mission_cleanup 
return 
